package cn.lg.soar.system.biz.filetemplate.model;

import com.amazonaws.HttpMethod;
import lombok.Getter;
import lombok.Setter;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * @author luguoxiang 469599794@qq.com
 * @Date: 2025/2/13 0:00
 * 开源项目：https://gitee.com/lgx1992/lg-soar 求star！请给我star！请帮我点个star！
 */
public class GeneratePresignedUrlRequestDTO {

    @Getter
    private String directory;

    @Getter
    private String filename;

    @Getter
    @Setter
    private Date expireDate;

    @Getter
    @Setter
    private HttpMethod method;

    @Getter
    @Setter
    private Map<String, String> requestParameters;

    public GeneratePresignedUrlRequestDTO(String directory, String filename) {
        this.directory = directory;
        this.filename = filename;
    }

    public void addRequestParameter(String key, String value) {
        if (requestParameters == null) {
            requestParameters = new HashMap<>(8);
        }
        requestParameters.put(key, value);
    }
}
